From ef0fdbb1db612088a8a5287f1fdb00dd95ba74b1 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 10 Feb 1994 23:59:25 +0000 Subject: [PATCH] (buffer_posn_from_coords): Take hscroll into account. --- src/dispnew.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index badc2d1a82b..6ca52618ce7 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -1254,6 +1254,7 @@ buffer_posn_from_coords (window, col, line) struct window *window; int col, line; { + int hscroll = XINT (window->hscroll); int window_left = XFASTINT (window->left); /* The actual width of the window is window->width less one for the @@ -1276,9 +1277,10 @@ buffer_posn_from_coords (window, col, line) sure I will keep it. */ posn = compute_motion (startp, 0, (window == XWINDOW (minibuf_window) && startp == 1 - ? minibuf_prompt_width : 0), + ? minibuf_prompt_width : 0) + + (hscroll ? 1 - hscroll : 0), ZV, line, col, - window_width, XINT (window->hscroll), 0); + window_width, hscroll, 0); current_buffer = old_current_buffer; -- 2.30.2